package MEET.src.code;
import java.sql.Timestamp;
import java.util.List;

public class MeetingServiceImpl implements MeetingService {
    private MeetingDao1 meetingDao = new MeetingDaoimpl();

    @Override
    public List<Meeting> searchMeetings(String meetingId,String hostName) {
        System.out.println("正在查询会议，会议号: " + meetingId);
        List<Meeting> meetings = meetingDao.searchMeetings(meetingId, hostName);
        System.out.println("查询到 " + meetings.size() + " 条记录");
        return meetings;
    }

    @Override
    public Meeting getMeetingDetails(String meetingId) {
        return meetingDao.getMeetingDetails(meetingId);
    }

    @Override
    public String joinMeeting(String meetingId, String userId) {
        return "参加成功";
    }


    @Override
    public List<Meeting> getHostedMeetings(String userId) {
        return meetingDao.getHostedMeetings(userId);
    }
    @Override
    public List<Meeting> searchHistoryMeetings(String searchKey, Timestamp startDate, Timestamp endDate) {
        return meetingDao.searchHistoryMeetings(searchKey, startDate, endDate);
    }


}
